package com.nuanshui.heatedloan.credit.dal.mapper;

import com.nuanshui.heatedloan.credit.form.CustomerBankCardInfoForm;
import com.nuanshui.heatedloan.credit.vo.CustomerBankCardInfoVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CustomerBankCardInfoMapper {
	  /***
	   * 新增客户基本信息
	   * @param customerBankCardInfoForm
	   */
      void saveCustomerBankCardInfo(CustomerBankCardInfoForm customerBankCardInfoForm);
      
      /***
       * 修改客户基本信息
       * @param customerBankCardInfoForm
       */
      void updateCustomerBankCardInfo(CustomerBankCardInfoForm customerBankCardInfoForm);
      
      /***
       * 查询客户信息
       * @param id
       * @return
       */
      CustomerBankCardInfoVO loadVO(@Param("id") String id);
      
      
      /***
       * 将卡的状态变为0
       * @param id
       */
      void deleteCustomerBankCardInfo(@Param("id") String id);

    /***
     * 获取用户绑定的卡
     * @param userId
     * @return
     */
    List<CustomerBankCardInfoVO> loadCustomerBankCardInfoVOByUserId(@Param("userId") String userId);

    /**
     * 查询银行卡信息
     * @param customerBankCardInfoForm
     * @return
     */
    CustomerBankCardInfoVO loadVOByObject(CustomerBankCardInfoForm customerBankCardInfoForm);

    /**
     * 获取用户最新添加的银行卡
     * @param userId
     * @return
     */
    CustomerBankCardInfoVO loadLatestVOByUserId(@Param("userId") String userId);

    /**
     * 获取用户绑定银行卡数量
     * @param userId
     * @return
     */
    int loadCountByUserId(@Param("userId") String userId);

    /**
     * /**
     * 通过用户id和银行卡号查询
     * @param userId
     * @param mixCardNo
     * @return
     */
    CustomerBankCardInfoVO loadVOByUserIdAndMixCardNo(@Param("userId") String userId, @Param("mixCardNo") String mixCardNo);

    /**
     * /**
     * 通过银行卡号查询
     * @param
     * @param mixCardNo
     * @return
     */
    CustomerBankCardInfoVO loadVOByMixCardNo(@Param("mixCardNo") String mixCardNo);
}
